1. Field of the Invention
The present invention relates to image sensors, and more particularly, to automatic exposure control and white balancing using active pixel CMOS sensors.
2. Background of the Invention
Solid State or electronic image sensors consist of array(s) of photodiodes that produce an electrical signal in response to light illumination. Such image sensors can be divided into two broad categories, CCD (charge-coupled devices) and CMOS (Complementary Metal Oxide Semiconductor), depending on how the signal is read out from the photodiodes.
Typically, CCD sensors use repeated lateral transfer of charge in an analog shift register. Photo-generated electrons or holes are read out after they are shifted in appropriate positions. CCD sensors have disadvantages, for example, to perform charge shifting with high fidelity, and low loss requires specialized semiconductor fabrication processes, which are not compatible with the fabrication process used to make most solid-state integrated circuits. This increases the overall cost of the CCD sensors.
In CMOS sensors, signals from the photodiodes are read out as column readout lines, one row at a time. During readout, there is no shifting of charge from one pixel to another. Because CMOS sensors are compatible with typical CMOS fabrication processes, they allow integration of additional signal processing logic on the same substrate as the sensor array. This leads to reduction in the size and cost of a digital camera.
A highly integrated CMOS sensor chip can perform many image processing functions that are otherwise carried out by a controller, external to the sensor. Two such functions are automatic exposure (AE) control and automatic white balancing (AWB) that are described below.
Automatic exposure (AE) control: Similar to conventional film, sensors in digital cameras are exposed to light for certain duration, known as the “exposure time”. For given light conditions and lens aperture, there is an optimum exposure time that produces desirable pictures. An exposure time longer than optimum results in an image that is overly bright, and it will look “washed out.” An exposure time shorter than the optimum time results in an image that is “too dark and difficult to view.” AE control is the ability of the sensor chip to select optimum exposure time for a given scene lighting condition, without user intervention.
Currently, AE control processes used in electronic digital cameras calculate the optimum exposure value after performing a histogram analysis on a signal strength measured at all the locations in a picture using multiple preliminary frames. One way of analyzing the signal strength distribution is to determine the actual frame mean and then to compare it with a desired frame mean. If the actual frame mean is less than the desired mean, then the exposure time is increased; otherwise, the exposure time is decreased.
Another conventional solution is to sort all pixels within an image frame into different brackets depending on their brightness. The goal is to count the number of pixels that are unacceptably bright and those that are unacceptably dark and then make an incremental adjustment to the exposure setting that tries to balance the number of pixels that are too dark with those that are too bright.
The foregoing conventional techniques have disadvantages. To determine the optimum exposure time, both the foregoing techniques require a starting point to acquire an image that is not fully saturated or completely dark for the histogram analysis. An additional photometer is required as a part of the digital camera to choose a suitable exposure starting point that is close to the optimum exposure for arbitrary light conditions. If no additional photometer is used, the first frame used by the foregoing techniques is either saturated or too dark. Consequently, conventional techniques require acquisition of several frames until the optimum exposure time is determined. If the camera is used in a snapshot mode, then there will be a noticeable delay from the time the camera trigger is pressed until the final picture is taken
Conventional techniques also have to process sequentially a large number of pixels to build representative histogram data or find the mean. Since these techniques work directly on sensor output as the sensor is being scanned out, all data processing circuitry for pixel tallying must operate at pixel readout rate and thus consumes a significant amount of power during multiple frames. The power penalty may be even higher if digital pixel data is processed. In this case, all blocks in the signal processing chain from the pixel to the analog-to-digital (A/D) converter need to be powered while the AE control block is running.
Automatic white balancing (AWB): Typical solid state imaging arrays can be described as combination of multiple sub-arrays of individual color detectors. One such pattern 100 (known as the Bayer pattern) that is commonly used is shown in FIG. 1. This arrangement consists of interspersed red, green and blue (also referred to herein as R, G, B) detectors (103-101). R 103, G 102 and B 101 pixels have different light sensitivity and thus produce different signal levels even if incident light is white with equal components of red, green and blue. As a result, a white object in a scene will not appear white in an unprocessed picture. This problem is corrected by “white balancing” which adjusts signal levels for R, G and B pixels so that the image of a white object appears white in a picture. White balancing involves multiplying R, G and B pixels in an image array (e.g. 100 of FIG. 1) by certain coefficients, known as white balance (WB) coefficients. If R, G and B are raw signal levels before white balancing, then the signal levels after white balancing, RWB, GWB and BWB may be expressed asRWB=WR*R  (1a)GWB=WG*G  (1b)BWB=WB*B  (1c)
WR, WB and WG are white balance coefficients for red, green and blue, respectively for a given lighting.
Manual white balancing requires the user to point a camera at a white background and manually adjust the WB coefficients until the background appears white, for which RWB=GWB=BWB. Also the WB coefficient for the color having the strongest raw signal is usually set to 1. For example, if G>B>R, then;WR=Gwhite/Rwhite  (2a)WG=1  (2b)WB=Gwhite/Bwhite  (2c)
Rwhite, Gwhite and Bwhite are raw signals from red, green and blue pixels comprising a white object and it is assumed that Gwhite is the strongest signal.
WB coefficients may be automatically determined by using equations (2a), (2b) and (2c). However, the user still needs to point the camera at a white object.
This restriction is overcome by making the assumption that real-world scenes contain equal amounts of red, green and blue colors. In other words, a typical white-balanced picture has equal means for R, G and B pixels when the means are calculated over the entire image. Under this assumption, equations (2a), (2b) and (2c) may be rewritten in terms of pixel means:WR= G/ R  (3a)WG=1   (3b)WR= G/ B,   (3c)where R, G and B are raw red, green and blue pixel means before white balancing and it is assumed (for illustration purposes) that the green mean is the highest.
Based on equations (3a), (3b) and (3c), real-life scene-based automatic white balancing requires three operations: 1) finding the mean values for R, G and B pixels; 2) finding the highest of the three means; 3) setting the WB coefficient of the color with the highest mean to 1, and finding the other two WB coefficients as ratios of the frame means. The three color means are representative only for a picture with intermediate frame brightness. A saturated picture or a picture that is too dark will not carry useful color information. Therefore white balancing will be accurate only after AE control is complete, which, as discussed earlier, takes several frames in conventional implementations.
Conventional AWB techniques have disadvantages. One such disadvantage is that conventional processes require several frames. Typically the user has to hold the camera still during this entire period since it is not clear when this process is completed by a digital camera and the actual picture is “saved.” Additional problems with conventional digital signal processing (DSP) or ASIC based implementations of the foregoing processes require additional chip area and power consumption. These limitations make the conventional processes impractical for single-chip digital camera applications.
Therefore what is required is a system and process for efficiently performing auto-exposure control and white balancing for the modern, single-chip digital cameras.